{% load staticfiles %}
<!DOCTYPE html>
<html lang="zh-cn" class="login-html">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>用户注册页面 - Python技术杂货铺</title>
<meta name="author" content="sunmouren" />
<meta name="description" content="Python技术杂货铺" />
<meta name="keywords" content="python, django, 大学生活，写作，技术分享" />
<link rel="icon" href="{% static 'images/favicon.ico' %}">
<link  href="{% static 'css/animate.min.css' %}" rel='stylesheet'/>
<link href="{% static 'css/bootstrap.min.css' %}" rel='stylesheet'/>
<link href="{% static 'css/font-awesome.min.css' %}" rel='stylesheet'>
<link href="{% static 'css/style.css' %}" rel='stylesheet'/>
</head>
  
<body class="nopadding login-box">
<div class="login">
  <div class="login-body">
    <a class="login-brand" href="#">
      <img class="img-responsive" src="{% static 'images/logo.jpg' %}" alt="logo" />
    </a>
    <div class="login-form">
{#        <div class="more-sign">#}
{#          <h6>社交帐号直接注册</h6>#}
{#          <ul>#}
{#            <li><a class="weibo" href="{% url 'users:oauth_weibo' %}"><i class="fa fa-weibo"></i></a></li>#}
{#            <li><a class="weixin" href="#"><i class="fa fa-wechat"></i></a></li>#}
{#            <li><a class="qq" href="#"><i class="fa fa-qq"></i></a></li>#}
{#          </ul>#}
{#        </div>#}
      <form action="{% url 'users:register' %}" method="post" target="_top">
        {% csrf_token %}
        <div class="form-group has-icon">
          <label class="control-label" for="email">邮箱</label>
          <span class="fa fa-envelope-o form-control-icon" aria-hidden="true"></span>
          <input id="email" class="form-control" type="email" name="email"  placeholder="邮箱注册" required autocomplete="off" />
        </div>
        <div class="form-group has-icon">
          <label for="password">密码</label>
          <span class="fa fa-lock form-control-icon" aria-hidden="true"></span>
          <input id="password" class="form-control" type="password" name="password"  placeholder="设置密码" required />
        </div>
        <div class="form-group sign-up-msg">
          点击 “注册” 即表示您同意并愿意遵守 Python技术杂货铺 <a href="#" class="text-teal">用户协议</a> 和 <a href="#" class="text-teal">隐私政策</a> 。
        </div>
        <button class="btn btn-teal btn-block" type="submit">注册</button>
{#        <div class="more-sign">#}
{#          <h6>社交帐号直接注册</h6>#}
{#          <ul>#}
{#            <li><a class="weibo" href="#"><i class="fa fa-weibo"></i></a></li>#}
{#            <li><a class="weixin" href="#"><i class="fa fa-wechat"></i></a></li>#}
{#            <li><a class="qq" href="#"><i class="fa fa-qq"></i></a></li>#}
{#          </ul>#}
{#        </div>#}
          <!--相关错误提示-->
        {% if register_form.errors.items %}
            <div class="alert alert-danger">
                <a href="#" class="close" data-dismiss="alert" >&times;</a>
                {% for key, error in register_form.errors.items %}
                    {{ error }}
                {% endfor %}
            </div>
        {% endif %}
      </form>
    </div>
  </div>
</div>
<script src="{% static 'js/jquery.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/bootstrap.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/jquery.lazyload.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/bootstrap-notify.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/app.js' %}" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
    var msg = '';
    {% if msg %}
        {% ifequal msg '0' %}
            msg = '发送邮箱验证码失败，请检查该邮箱是否存在!';
        {% endifequal %}
        {% ifequal msg '1' %}
            msg = '用户已存在!';
        {% endifequal %}
        {% ifequal msg '-1' %}
            msg = '提交信息不合法!';
        {% endifequal %}
        tips(msg, 'danger');
    {% endif %}
    return true;
});
</script>
</body>
</html>